<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0056)http://shop.dongxiangsoft.com/shop/product.aspx -->
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD><TITLE>商城</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META content=IE=EmulateIE7 http-equiv=X-UA-Compatible>
<STYLE type=text/css>UNKNOWN {
	BACKGROUND-COLOR: #ececec; MARGIN: 0px
}
.STYLE1 {
	COLOR: #990000
}
BODY {
	FONT-SIZE: 12px
}
TD {
	FONT-SIZE: 12px
}
TH {
	FONT-SIZE: 12px
}
.STYLE2 {
	COLOR: #ff0000; FONT-WEIGHT: bold
}
.STYLE3 {
	COLOR: #333333
}
.STYLE13 {
	COLOR: #ffffff; FONT-SIZE: 14px; FONT-WEIGHT: bold
}
.STYLE14 {
	COLOR: #ff0000; FONT-SIZE: 24px
}
.STYLE16 {
	FONT-SIZE: 24px
}
.STYLE17 {
	BACKGROUND-COLOR: rgb(255,255,255); FONT-FAMILY: "宋体" , Arial, Helvetica, sans-serif; COLOR: rgb(85,85,85); FONT-SIZE: 12px
}
</STYLE>
<LINK rel=stylesheet href="list_files/min.css">
<SCRIPT src="list_files/common.js"></SCRIPT>

<SCRIPT type=text/javascript src="list_files/jquery-1.3.1.js"></SCRIPT>

<META name=GENERATOR content="MSHTML 9.00.8112.16450"></HEAD>
<BODY>
<LINK rel=stylesheet type=text/css 
href="list_files/indexcss.css">

<?php require'shophead.php'; 
/*echo "<script>alert('$flname');</script>";*/
 $sqlleft="select * from {$db_prefix}psort where flname ='$flname'";  
  $rsleft=$db->get_one($sqlleft);
?> 


<TABLE style="BORDER-BOTTOM: #cccccc 0px solid" border=0 cellSpacing=0 
cellPadding=0 width=980 align=center height=5>
</TABLE>
<TABLE border=0 cellSpacing=0 cellPadding=0 width=1200 align=center>
  <TBODY>
  <TR>
    <TD bgColor=#ffffff vAlign=top width=225>
      <TABLE border=0 cellSpacing=0 cellPadding=0 width="99%" align=center>
        <TBODY>
        <TR>
          <TD height=34 background=list_files/title_bg.jpg><SPAN 
            class=STYLE13>&nbsp; <SPAN id=Label1>商品分类</SPAN> </SPAN></TD></TR>
        <TR>
          <TD style="LINE-HEIGHT: 25px; PADDING-LEFT: 5px; PADDING-TOP: 5px" 
          vAlign=top align=center>
            <TABLE style="BORDER-COLLAPSE: collapse" id=DataList1_fl border=0 
            cellSpacing=0>
              <TBODY>
          <?    $sql="select count(id) as c  from {$db_prefix}psort where  fid='0'"; 
  $rs2=$db->get_one($sql);  
  $sql="select * from {$db_prefix}psort where fid='0'";  
  $result1=$db->query($sql);
  while($rs2=$db->fetch_array($result1)){
	 ?>
              <TR>
                <TD>
                  <TABLE style="BORDER-BOTTOM: #cccccc 1px dashed" border=0 
                  cellSpacing=0 cellPadding=0 width="87%">
                    <TBODY>
                    <TR>
                      <TD width=100 align=left><A 
                       href="product_order_one.php?flname=<?=$rs2['flname']?>"> <STRONG><?=$rs2['flname']?></STRONG></A> 
                      </TD></TR>
                   <TR>
                      <TD align=left>
                        <TABLE style="BORDER-COLLAPSE: collapse" 
                        id=DataList1_fl_ctl00_DataList1_fl2 border=0 
                        cellSpacing=0>
                          <TBODY><TR>
                          <?  
 $flid1=$rs2['id'];
  $sql="select * from {$db_prefix}psort where fid=$flid1";  
  $result2=$db->query($sql);
  $i=0;
  while($rs3=$db->fetch_array($result2)){ 
  	$i=$i+1;
	if($i>2) break;
  ?>
                         
                            <TD>&nbsp;<A 
                              style="WIDTH: 100px; DISPLAY: inline-block" 
                              id=DataList1_fl_ctl00_DataList1_fl2_ctl00_HyperLink3 
                              href="product_order_one.php?flname=<?=$rs3['flname']?>"><?=$rs3['flname']?></A> &nbsp; 
                       </TD>
                       <? } $db->free_result($result2);
			?>                                        
                            
                          </TR>  </TBODY></TABLE></TD></TR>
                    <TR>
                      <TD style="BORDER-BOTTOM: #cccccc 1px dashed; HEIGHT: 1px" 
                      align=left>&nbsp; </TD></TR></TBODY></TABLE></TD></TR>
           <? }
			$db->free_result($result2);
			?>                  
             </TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
   <TD bgColor=#ffffff vAlign=top width=975>
      <TABLE style="BORDER-BOTTOM: #de0635 1px solid" border=0 cellSpacing=0 
      cellPadding=0 width="100%" height=31>
        <TBODY>
        <TR>
          <TD width="15%">
            <TABLE border=0 cellSpacing=0 cellPadding=0 width="100%" 
              height=33><TBODY>
              <TR>
                <TD background=list_files/title_bg.jpg align=center><SPAN 
                  class=STYLE13>商品列表</SPAN> </TD></TR></TBODY></TABLE></TD>
          <TD width="85%"></TD></TR></TBODY></TABLE><BR>  
          
             
       <TABLE 
      style="BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid" 
      border=0 cellSpacing=0 cellPadding=0 width="100%">
        <TBODY>
        <TR>
          <TD>
            <TABLE style="BORDER-COLLAPSE: collapse" id=DataList1 border=0 
            cellSpacing=0>
              <TBODY>
       
       
       
       <div class="smc1">
       
       
       <? 
	   	  $psortid=$_GET['id'];
		  //$psortid=$rs1['id'];
		 /* var_dump($psortid);
		  exit;*/
		 /* echo "<script>alert('$psortid');</script>";*/
		  if ($psortid!=''){
			$pstr='';
			$sqlf="select id,flname from {$db_prefix}psort where find_in_set('$psortid',path)>0 or id='$psortid'";
			$resultf=$db->query($sqlf);
			while($rsf=$db->fetch_array($resultf)){
					if ($pstr!='') $pstr.=',';$pstr.=$rsf['id'];
			}
			$db->free_result($resultf);
			if ($pstr!=''){
				$query.=" and find_in_set(psortid,'$pstr')>0";
			}
		  }	
		  $sql="select count(id) as c  from {$db_prefix}products where 1";
		  if ($query!='') $sql.=$query;
		  $rs=$db->get_one($sql);
		  $sum=$rs['c'];
		 /* echo "<script>alert('$sum');</script>";*/
		  $times=$sum/4;
		  for($i=0;$i<=$times;$i++){
		  
		  ?>
                        <ul class="clist style{$key+1}">
<?
					$start=$i*4;
                	$sqlsp="select *  from {$db_prefix}products where 1 ";
				  	if ($query!='') $sqlsp.=$query;
					$sqlsp.=" limit $start,4 ";
				  	$resultflsp=$db->query($sqlsp);
  					while($rsflsp=$db->fetch_array($resultflsp)){
				?>
                        	<li class="fore{$key+1}">
                            	<div class="p_img">
                                        <a href="product_order.php?id=<?=$rsflsp['id']?>" target="_blank">
                                            <img src="../uploads/productimgs/<?=$rsflsp['pimg']?>" alt="" width="220px" />
                                        </a>
                                    </div>
                                    <div class="p_name">
                                        <a href="product_order.php?id=<?=$rsflsp['id']?>" target="_blank"><?=$rsflsp['productname']?></a>
                                    </div>
                                    <div class="p_price">
                                    	市场价：￥<?=$rsflsp['scprice']?>
                                        <span></span>
                                    </div>
                                    <div class="p_price">
                                    	会员价：￥<?=$rsflsp['price']?>
                                        <span></span>
                                    </div>
                            </li>
                            
<?
  }
  $db->free_result($result);
?>    
                        </ul>   
<? 
$db->free_result($result);
}
?>                                              
                    </div>
       
       
       
       
       
       
       
       
       </TBODY></TABLE></TD></TR>
       </TBODY></TABLE></TD></TR></TBODY></TABLE>
       
       
       
       
       
       
       
       
       
       
       
       
       
       <BR>
<?php require_once("product_buy_foot.php");?>	
</BODY></HTML>
